
import plugin from '../../../../lib/plugins/plugin.js';
import { getPlayerByE, pm } from './main.js';




export class LNERobot extends plugin {
    constructor() {
        super({
            name: '机器人',
            dsc: '机器人',
            event: 'message',
            priority: 5,
            rule: [
                {
                    /** 命令正则匹配 */
                    reg: '^信息$',
                    /** 执行方法 */
                    fnc: 'myInfo'
                },
            ]
        });

        super.playerManager = pm;
    }


    async myInfo(e) {
        let player = await getPlayerByE(e);
        super.reply(
            `【${player.name}】
等级：${player.level}（Exp：${player.exp}/${player.maxExp}）
硬币：${player.coin}
生命值：${player.currentHp}/${player.maxHp}
攻击力：${player.attackPower}
防御力：${player.defensivePower}
敏捷度：${player.agility}`
        );
    }
}
